from sklearn.datasets import load_iris, load_wine
from sklearn.model_selection import train_test_split


def loadDatas(datasSubject='iris', test_size=0.2):
    datasDict = dict()
    if datasSubject == 'iris':
        datasDict = load_iris()
    elif datasSubject == 'wine':
        datasDict = load_wine()
    else:    # 更多数据集加载
        pass
    X = datasDict.data
    Y = datasDict.target
    X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=test_size)
    return X_train, X_test, y_train, y_test

